package com.express.e.root.utils;

import java.util.Random;

public class RandomCodeUtil {
    private static Integer randomCode = 0;

    public static Integer getRandomCode() {
        if (randomCode == 0) {
            randomCode = randomGenerate();
        }
        return randomCode;
    }

    public static Integer randomGenerate(){
        Integer nextInt = new Random().nextInt(899999);
        randomCode = nextInt+100000;
        return randomCode;
    }
}
